﻿var canvas1;

var canvas2;

var canvas3;

var property = {
	con_width : 450,
	con_height : 320,
	canvas_width : 320,
	canvas_height : 320,
	canvas_top : 0,
	canvas_left : 0,
	core_x : 160,
	core_y : 160,
	radius : 150
}

$(document).ready(function() {
	$("#singles").tableSorter( {
		stripingRowClass : [ 'odd', 'even' ],
		stripRowsOnStartUp : true
	});
	$("#families").tableSorter( {
		stripRowsOnStartUp : true
	});
	$("#bankcarditems").tableSorter( {
		stripingRowClass : [ 'odd', 'even' ],
		stripRowsOnStartUp : true
	});
	$("#persons").tableSorter( {
		stripingRowClass : [ 'odd', 'even' ],
		stripRowsOnStartUp : true
	});
	$('#faq').find('dd').hide().end().find('dt').click(function() {
		var answer = $(this).next();
		if (answer.is(':visible')) {
			answer.slideUp();
		} else {
			answer.slideDown();
		}
	});

	canvas1 = $.createGooPieChart($("#canvas1"), property);
	canvas1.setTitle("Age Infromation", "person");
	canvas1.setDataKind(ageDataKind);
	canvas1.loadPieData(ageData, "num", "Total: &d");

	canvas2 = $.createGooPieChart($("#canvas2"), property);
	canvas2.setTitle("Sex Infromation", "person");
	canvas2.setDataKind(sexDataKind);
	canvas2.loadPieData(sexData, "num", "Total: &d");

	canvas3 = $.createGooPieChart($("#canvas3"), property);
	canvas3.setTitle("Status Infromation", "person");
	canvas3.setDataKind(statusDataKind);
	canvas3.loadPieData(statusData, "num", "Total: &d");

});

$(function() {
	$("#datepicker").datepicker();
});
